<!DOCTYPE HTML>
<html>
	<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>ll论坛</title>
	<script>
	var OriginTitile=document.title;
	var st;
	document.addEventListener('visibilitychange',function()
	{
		if(document.hidden)
		{
			document.title="快回来，页面崩溃啦";
			clearTimeout(st);
		}
		else
		{
			document.title="(ฅ>ω<*ฅ) 噫又好了~ "+OriginTitile;
			st=setTimeout(function()
			{
				document.title=OriginTitile;
			},2000);

		}
		
	});
	</script>
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="description" content="Free HTML5 Website Template" />
	<meta name="keywords" content="free website templates, free html5, free template, free bootstrap, free website template, html5, css3, mobile first, responsive" />
	


	
	<!-- Animate.css -->
	<link rel="stylesheet" href="css/animate.css">
	<!-- Icomoon Icon Fonts-->
	<link rel="stylesheet" href="css/icomoon.css">
	<!-- Themify Icons-->
	<link rel="stylesheet" href="css/themify-icons.css">
	<!-- Bootstrap  -->
	<link rel="stylesheet" href="css/bootstrap.css">
	<!-- Magnific Popup -->
	<link rel="stylesheet" href="css/magnific-popup.css">
	<!-- Owl Carousel  -->
	<link rel="stylesheet" href="css/owl.carousel.min.css">
	<link rel="stylesheet" href="css/owl.theme.default.min.css">
	<!-- Flexslider -->
	<link rel="stylesheet" href="css/flexslider.css">
	<!-- Theme style  -->
	<link rel="stylesheet" href="css/style.css">

	<!-- Modernizr JS -->
	<script src="js/modernizr-2.6.2.min.js"></script>
	<!-- FOR IE9 below -->
	<!--[if lt IE 9]>
	<script src="js/respond.min.js"></script>
	<![endif]-->

	</head>
	<body>
		
	<div class="gtco-loader"></div>
	
	<div id="page">
	<nav class="gtco-nav" role="navigation">
		<div class="gtco-container">
			<div class="row">
				<div class="col-sm-2 col-xs-12">
					<div id="gtco-logo"><a href="index.html">论坛 <em>L</em></a></div>
				</div>
				<div class="col-xs-10 text-right menu-1 main-nav">
					<ul>
						<li class="active"><a href="#" data-nav-section="home">首页</a></li>
                        <li><a href="#" data-nav-section="sq">论坛</a></li>
						<li><a href="#" data-nav-section="portfolio">社区</a></li>
						<li><a href="#" data-nav-section="blog">个人主页</a></li>
					</ul>
				</div>
			</div>
			
		</div>
	</nav>
<div class="gtco-section" id="gtco-portfolio" data-section="home">
			<div class="gtco-container">
				<div class="row">
					<div class="col-md-8 col-md-offset-2 text-center gtco-heading">
						<h2>介绍</h2>
						<p>网页表白</p>
					
					<P>只需要输入你们的姓名
					<p>一键生成网页表白
					<P>可以通过网址或者二维码查看
					</div>
				</div>
				<div class="row">
					<div class="col-md-4">
					

				</div>
			</div>
		</div>
		<div class="gtco-section" id="gtco-portfolio" data-section="portfolio">
			<div class="gtco-container">
				<div class="row">
					<div class="col-md-8 col-md-offset-2 text-center gtco-heading">
						<h2>教程</h2>
<p>第一步输入自己和被表白人的姓名
<p>第二步点击生成
<p>第三步下载二维码或者复制链接
					</div>
				</div>
				<div class="row">
					<div class="col-md-4">
					

				</div>
			</div>
		</div>
		
		<div class="gtco-section" id="gtco-portfolio" data-section="blog">
			<div class="gtco-container">
				<div class="row">
					<div class="col-md-8 col-md-offset-2 text-center gtco-heading">
						<h2>创建</h2>
<p><form method="GET">
		<p>被表白者<input type="text" name="bbbe" size="30" maxlength="100"/><p>
		表白者<input type="text" name="bbr" size="30" maxlength="100"/><p>
		第一次见面的日期<input type="text" name="rq" size="30" maxlength="100"/><p>
		<input type="submit" value="确定"><p>
		<font color="#778899" size="2">/*请注意：日期填写格式是年,月,日    例子：2015,01,08     注意逗号是英文的<p>
		如果写错会导致网页出现问题*/</font>
		</form>
		<?php
		class RandChar{

  function getRandChar($length){
   $str = null;
   $strPol = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz";
   $max = strlen($strPol)-1;

   for($i=0;$i<$length;$i++){
    $str.=$strPol[rand(0,$max)];//rand($min,$max)生成介于min和max两个数之间的一个随机整数
   }

   return $str;
  }
 }

 $randCharObj = new RandChar();
 $ss=$randCharObj->getRandChar(15);
		$bb=$_GET['bbbe'];
		If ($bb!==null and $bb!==""){
		$link=mysql_connect("exodus.gotoftp2.com","exodus","exoLAY") or die("数据库连接失败".mysql_error());//链接数据库
				mysql_select_db("exodus",$link);//选择数据库
				mysql_query("set names utf8");//使用utf8连接
				$bbbe=$_GET["bbbe"];
				$bbr=$_GET["bbr"];
				$rq=$_GET["rq"];
				
				mysql_query("INSERT INTO bb (bbbe, bbr, rq, zh) VALUES ('$bbbe', '$bbr', '$rq', '$ss')");//写入数据
				echo "<script>alert('写入成功'); window.location.href='cj.php?yy=$ss'</script>";
		}
				?>
					</div>
				</div>
			
		</div>

	<footer id="gtco-footer" role="contentinfo">
		<div class="gtco-container">
			
			<div class="row copyright">
				<div class="col-md-12">
					<p class="pull-left">
						<small class="block">&copy; 2016 Free HTML5. All Rights Reserved.</small> 
						<small class="block">from LAY-XbacK:MK</small>
					</p>
					<p class="pull-right">
						<ul class="gtco-social-icons pull-right">
							<li><a href="#"><i class="icon-twitter"></i></a></li>
							<li><a href="#"><i class="icon-facebook"></i></a></li>
							<li><a href="#"><i class="icon-linkedin"></i></a></li>
							<li><a href="#"><i class="icon-dribbble"></i></a></li>
						</ul>
					</p>
				</div>
			</div>

		</div>
	</footer>
	</div>

	<div class="gototop js-top">
		<a href="#" class="js-gotop"><i class="icon-arrow-up"></i></a>
	</div>
	
	<!-- jQuery -->
	<script src="js/jquery.min.js"></script>
	<!-- jQuery Easing -->
	<script src="js/jquery.easing.1.3.js"></script>
	<!-- Bootstrap -->
	<script src="js/bootstrap.min.js"></script>
	<!-- Waypoints -->
	<script src="js/jquery.waypoints.min.js"></script>
	<!-- Carousel -->
	<script src="js/owl.carousel.min.js"></script>
	<!-- countTo -->
	<script src="js/jquery.countTo.js"></script>
	<!-- Flexslider -->
	<script src="js/jquery.flexslider-min.js"></script>
	<!-- Magnific Popup -->
	<script src="js/jquery.magnific-popup.min.js"></script>
	<script src="js/magnific-popup-options.js"></script>
	<!-- Main -->
	<script src="js/main.js"></script>

	</body>
</html>

